package com.junmeng.jdemo.recycler.chat.viewbinding;

import android.view.View;

import androidx.annotation.NonNull;

import com.example.common.recycler.viewbinding.BaseViewBindingBindView2;
import com.example.common.recycler.viewbinding.ViewBindingViewHolder;
import com.junmeng.jdemo.R;
import com.junmeng.jdemo.databinding.ItemChatSystemBinding;

public class BindViewSystem extends BaseViewBindingBindView2<BindViewSystem.Item, ItemChatSystemBinding> {

    @Override
    public ItemChatSystemBinding getBinding(@NonNull View itemView, Item item) {
        return ItemChatSystemBinding.bind(itemView);
    }

    @Override
    public int getItemLayoutResId(Item item) {
        return R.layout.item_chat_system;
    }

    @Override
    public void bindViewDataWithFull(ViewBindingViewHolder<ItemChatSystemBinding> holder, int position, Item item) {
        holder.binding.text.setText(item.text);
    }

    public static class Item {
        public Item(String text) {
            this.text = text;
        }

        public String text;

    }

}
